import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterModule } from '@angular/router';

import { NotebookWxappSharedModule } from '../../shared';
import {
    PicService,
    PicPopupService,
    PicComponent,
    PicDetailComponent,
    PicDialogComponent,
    PicPopupComponent,
    PicDeletePopupComponent,
    PicDeleteDialogComponent,
    picRoute,
    picPopupRoute,
} from './';

const ENTITY_STATES = [
    ...picRoute,
    ...picPopupRoute,
];

@NgModule({
    imports: [
        NotebookWxappSharedModule,
        RouterModule.forChild(ENTITY_STATES)
    ],
    declarations: [
        PicComponent,
        PicDetailComponent,
        PicDialogComponent,
        PicDeleteDialogComponent,
        PicPopupComponent,
        PicDeletePopupComponent,
    ],
    entryComponents: [
        PicComponent,
        PicDialogComponent,
        PicPopupComponent,
        PicDeleteDialogComponent,
        PicDeletePopupComponent,
    ],
    providers: [
        PicService,
        PicPopupService,
    ],
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class NotebookWxappPicModule {}
